<!doctype html><html><head><title>relief.nav.NavManager</title><link href="../../stylesheet.css" rel="stylesheet" type="text/css"></head><body><a href="../../index.html">Home</a><h1>Class relief.nav.NavManager</h1><p>The Nav class is responsible for routing location changes to the appropriate
Handler class.  For the purposes of using a goog.History object, this class
requires there be an iframe with the id "history_frame" and a hidden input
element with the id "history_input".

NavManager fires relief.nav.NavEvent events on successful navigations.</p>extends <a href="../../goog/events/EventTarget.html">goog.events.EventTarget</a><table class="method-list"><tr><td colspan="2"><strong>Instance Method Summary</strong></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>activateHandler_(?relief.nav.Path path, boolean isTransition)</code><br><p class="method-description">If the handler for the new path is the same as the handler for the last path,
tell the handler to transition to the new path.  If not, create a new
instance of the handler for the new path and tell it to handle this path.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>buildPath_(string hash, string path, string params, (function (relief.nav.NavServiceProvider): ?|null|relief.nav.PageConfig=) mapping) &#8658; ?relief.nav.Path</code><br><p class="method-description">Build a relief.nav.Path object based on the given params.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>disectPath_(string hash) &#8658; ?relief.nav.Path</code><br><p class="method-description">Helper method to determine the handler, token, and path params of a
hash token.</p></td></tr><tr><td class="method-list-cell method-access method-protected"></td><td class="method-list-cell method-cell"><code>disposeInternal()</code><br><p class="method-description">Unattach listeners from this object.  Classes that extend EventTarget may
need to override this method in order to remove references to DOM Elements
and additional listeners, it should be something like this:
<pre>
MyClass.prototype.disposeInternal = function() {
MyClass.superClass_.disposeInternal.call(this);
// Dispose logic for MyClass
};
</pre></p></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getCurrentPage() &#8658; ?relief.nav.Path</code><br></td></tr><tr><td class="method-list-cell method-access method-public"></td><td class="method-list-cell method-cell"><code>getReferer() &#8658; ?relief.nav.Path</code><br></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>onAuthEvent_(?relief.auth.AuthChangeEvent event)</code><br><p class="method-description">The nav manager listens to the auth manager for auth/auth events.  When
an event occurs, the nav manager fetches a new User object and needs to
verify that the user is still allowed to view whatever he was already
viewing.  This is done by calling verifyAuth_ with the current path and the
new User object.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>onExit_(?relief.nav.Path path, boolean force, boolean exitComplete)</code><br><p class="method-description">Callback to handler.dispose</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>onNavigation_(?relief.nav.Path path, boolean complete)</code><br><p class="method-description">Callback passed to the transition method of handler objects.  We have to
know when every handle is complete so we can dispatch navigation events on
successful transitions and not dispatch them on cancelled ones.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>rollback_()</code><br><p class="method-description">If the user decides during either the dispose or transition calls not to
leave their current page, this method will be called to roll back the
navigation state.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>route_(?goog.history.Event event)</code><br><p class="method-description">Determines the appropriate handler based on the path, either creates a new
one or gets an existing one, figures out dependencies and params, then
activates.</p></td></tr><tr><td class="method-list-cell method-access method-private"></td><td class="method-list-cell method-cell"><code>verifyAuth_(?relief.nav.Path path, ?relief.auth.User user)</code><br><p class="method-description">Once this.route_ gets the handler for the path, execution flows to
verifyAuth to ensure the user has the proper authorizations to execute
the attached handler.  Handlers assume that the user is allowed to see them.</p></td></tr></table></body></html>